package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;


@Data
@TableName("orderitem")
@ApiModel("OrderItem对象")
public class OrderItem implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "订单商品id",required = true,example = "0")
    private Integer id;//订单主键

    @TableField("goods_id")
    @ApiModelProperty("商品id")
    private Integer goodsId;//商品

    @TableField("orders_id")
    @ApiModelProperty("订单id")
    private Integer ordersId;//订单

    @TableField("user_id")
    @ApiModelProperty("用户id")
    private Integer userId;

    @TableField("number")
    @ApiModelProperty("商品销量")
    private Integer number;

    @TableField(exist = false)
    @ApiModelProperty("商品名称")
    private String goodsName;

    @TableField(exist = false)
    @ApiModelProperty("商品价格")
    private Float goodsPrice;
}
